package com.ftg.learnmybatis.annotation;

import com.ftg.learnmybatis.annotation.entity.StudentEntity;
import com.ftg.learnmybatis.annotation.mapper.DemoMapper;
import com.ftg.learnmybatis.annotation.mapper.StudentMapper;
import com.ftg.learnmybatis.annotation.util.BaseMybatisUtil;

/**
 * 运行相关的主类程序
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/3/14 下午3:44
 */
public class MainMybatis {

    public static void main(String[] args) {
        DemoMapper demoMapper = BaseMybatisUtil.getInterfaceInSession(DemoMapper.class);
        System.out.println(demoMapper.showList());

//        StudentMapper studentMapper = BaseMybatisUtil.getInterfaceInSession(StudentMapper.class);
//
//        StudentEntity stu = new StudentEntity();
//        stu.setSno("s111");
//        stu.setSname("狗蛋");
//        stu.setSsex("男");
//        stu.setSage(23);
//
//        studentMapper.saveStudent(stu);
//
//        studentMapper.showList();
    }

}
